package cn.fl.project.service.impl;

import java.util.ArrayList;
import java.util.List;

import cn.fl.project.api.IPrjRskAudWarnRecApiService;
import cn.fl.project.condition.PrjRskAudWarnRecQC;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.fl.project.dto.PrjRskAudWarnRecDTO;
import cn.fl.project.service.IPrjRskAudWarnRecService;
import cn.fl.project.transform.PrjRskAudWarnRecVOTransform;
import cn.fl.project.vo.PrjRskAudWarnRecVO;
import cn.fl.framework.base.context.CurrentThreadContext;
import cn.cmm.base.framework.utils.BaseLogUtils;
import cn.cmm.base.framework.utils.CollectionUtils;
import cn.cmm.base.framework.utils.StringUtils;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.cmm.base.framework.logger.eum.LogExceptionEnum;

/**
 * @Description: PRJ_RSK_AUD_WARN_REC(项目风险审核提醒表) 客户端服务层接口实现
 * @Description: 业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
 */
@Service
public class PrjRskAudWarnRecServiceImpl implements IPrjRskAudWarnRecService {
	
	/**
	 * 项目风险审核提醒表API服务
	 */
	@Autowired
	private IPrjRskAudWarnRecApiService prjRskAudWarnRecApiService;

	@Override
	public List<PrjRskAudWarnRecVO> searchPrjRskWarnRec(PrjRskAudWarnRecQC prjRskAudWarnRecQC) {
    	if (null == prjRskAudWarnRecQC) {
    		return new ArrayList<>();
		}
		BaseLogUtils.newLogger("searchPrjRskWarnRec,获取项目风险审核提醒记录Start,prjRskAudWarnRecQC:{},CurrentUser:{}", JSON.toJSONString(prjRskAudWarnRecQC), CurrentThreadContext.getCurrentUserName()).info();
		List<PrjRskAudWarnRecDTO> prjRskAudWarnRecDTOS = this.prjRskAudWarnRecApiService.searchChangePrjRskAudWarnRecList(prjRskAudWarnRecQC);
		BaseLogUtils.newLogger("searchPrjRskWarnRec,获取项目风险审核提醒记录End,prjRskAudWarnRecQC:{},CurrentUser:{}", JSON.toJSONString(prjRskAudWarnRecDTOS), CurrentThreadContext.getCurrentUserName()).info();
		return PrjRskAudWarnRecVOTransform.toVOList(prjRskAudWarnRecDTOS);
	}
}
